<!DOCTYPE html>
<html>
<head>
    <title> {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>
</head>

<body class="page-index">
<div class="container">
    <include file="public@nav"/>

    <!--浮动按钮-->
    <!--<div class="cwjgy">-->
        <!--<a href="{:url('apply',['org_id'=>3])}">-->
            <!--加入交管员-->
        <!--</a>-->
    <!--</div>-->
    <div class="contents">

        <div class="headline clearfix">
            <div class="slider">
                <div class="swiper-wrapper">
                    <php>
                        $top_slide_id=empty($theme_vars['top_slide'])?2:$theme_vars['top_slide'];
                    </php>
                    <slides id="$top_slide_id">
                        <div class="swiper-slide"><a href="{$vo.url|default=''}"><img src="{:cmf_get_image_url($vo.image)}" title="{$vo.title|default=''}" height="100%" width="100%"><p>{$vo.title|default=''}</p></a></div>
                    </slides>
                </div>
            </div>

            <div class="interactive controllPm">

                <widget name="last_articles">
                <div class="login box">
                    <div class="title"><h2>社区小故事</h2> <a href="" class="more">MORE</a></div>
                    <div class="box-cont">
                        <ul>
                            <portal:articles limit="5" order="post.published_time DESC"
                                             categoryIds="5">
                            <li>
                                <a href="{:url('portal/New/detail',array('id'=>$vo['id']))}">
                                    <div class="sqxwTitle">{$vo.post_title}</div>
                                    <div class="sqxwTime">2019/10/16</div>
                                    <div style="clear: both;"></div>
                                </a>
                            </li>
                            </portal:articles>

                        </ul>
                    </div>
                </div>
                </widget>
            </div>
        </div>
        <div class="news clearfix controllBlock">
            <div class="top controllTop">
                <div class="title">
                    <ul class="news-title">
                        <li class="title-item active"><a href="#">活动预告</a></li>
                    </ul>
                    <a href="{:url('activity_list')}" class="more">MORE</a>
                </div>
                <div class="box-cont">
                    <div class="act-forenotice">
                        <ul>

                            <foreach name="data" id="vo">
                            <li>

                                <if condition="!empty($vo.show)">
                                    <a href="{:url('portal/Activity/act_show',array('id'=>$vo['id']))}" target="_blank">
                                        <div class="controllDian">
                                            <img src="/html/img/dian.png">
                                        </div>
                                        <div class="controllTitle">
                                            {$vo.title}
                                        </div>
                                        <div class="controllTime">
                                            {$vo.ctime|date="Y-m-d H:i"}
                                        </div>
                                    </a>
                                    <else/>
                                    <a href="{:url('portal/Activity/act_adv',array('id'=>$vo['id']))}" target="_blank">
                                        <div class="controllDian">
                                            <img src="/html/img/dian.png">
                                        </div>
                                        <div class="controllTitle">
                                            {$vo.title}
                                        </div>
                                        <div class="controllTime">
                                            {$vo.ctime|date="Y-m-d H:i"}
                                        </div>
                                    </a>
                                </if>


                            </li>
                            </foreach>

                        </ul>
                    </div>
                </div>
            </div>
            <div class="rank box">
                <div class="title"><div class="hxSty"></div><h2>交管员排行</h2> <a href="" class="more">MORE</a></div>
                <div class="box-cont">
                    <div class="tab-ctrl">
                        <ul>
                            <li class="tab-ctrl-item active" data-id="1">巡逻管控</li>
                            <li class="tab-ctrl-item" data-id="2">重点人/车管控</li>
                            <li class="tab-ctrl-item" data-id="3">隐患路段上报</li>

                        </ul>
                    </div>
                    <div class="tab-pannel">

                        <div class="list-by-credit">
                            <ul>
                                <foreach name="patrol" id="vo" key="k">
                                <li>
                                    <span class="number front">{$k+1}</span><a class="name" href="">{$vo.name}</a><span class="remarks">{$vo.patrol}次</span>
                                </li>
                                    </foreach>

                            </ul>
                        </div>

                        <div class="list-by-credit hidden">
                            <ul>
                                <foreach name="man_car" id="vo" key="k">
                                    <li>
                                        <span class="number front">{$k+1}</span><a class="name" href="">{$vo.name}</a><span class="remarks">{$vo.man_car}次</span>
                                    </li>
                                </foreach>

                            </ul>
                        </div>
                        <div class="list-by-credit hidden">
                            <ul>

                                <foreach name="road" id="vo" key="k">
                                    <li>
                                        <span class="number front">{$k+1}</span><a class="name" href="">{$vo.name}</a><span class="remarks">{$vo.road}次</span>
                                    </li>
                                </foreach>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div style="clear: both;"></div>
        </div>



        <div class="volunteers box mxzyz">
            <div class="title"><h2>明星交管员</h2></div>
            <div id="Marquee_x">
                <ul>
                    <foreach name="talent" id="vo">
                    <li>
                        <div>
                                <img src="{$vo.avatar|default='__STATIC__/images/head.png'}" />
                                <span>{$vo.name}</span>
                        </div>
                        <div>{$vo.content}</div>
                    </li>
                   </foreach>
                </ul>
            </div>
        </div>
    </div>

    <include file="public@footer"/>
    <!-- /container -->
    <include file="public@scripts"/>
    <script type="text/javascript" src="/html/js/jQuery-jcMarquee.js"></script>
    <script>
        (function($){
            "use strict";
            function init_swiper(){
                var mySwiper = new Swiper('.slider', {
                    autoplay: true,//可选选项，自动滑动
                });
            }
            function bind_events(){
                $('.volunteers li img').hover(function(){$(this).MaxScaleLarge()},function(){$(this).MaxScaleSmall()});

                $('.top .title-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    var _url = $(this).find('a').prop('href');
                    $('.top .more').prop('href',_url);
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.top .box-cont div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
                $('.tab-ctrl-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.rank .tab-pannel div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                })
            }
            $(function(){
                $('.controllPm ul li:last').css("border","none");
                bind_events();
                init_swiper();
            });
            $('#Marquee_x').jcMarquee({ 'marquee':'x','margin_right':'15px','speed':30 });
        })(jQuery);
        //layui
        layui.use(['laypage', 'layer'], function() {
            var laypage = layui.laypage
                    , layer = layui.layer;
        });
    </script>
    <hook name="before_body_end"/>
</body>
</html>